﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>试卷预览</title>


    <!-- Le styles -->

    <link href="~/Scripts/NewFiles/bootstrap.min.css" rel="stylesheet" />

    <link href="~/Scripts/NewFiles/bootstrap-responsive.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" media="screen" href="~/css/smartadmin-skins.css">
    <style>
        body {
            font-family: "ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Helvetica Neue",Helvetica,Arial,"Hiragino Sans GB","Hiragino Sans GB W3","Microsoft YaHei UI","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;
        }
    </style>

    <link href="~/Scripts/NewFiles/prettify.css" rel="stylesheet" />
    <link href="~/Scripts/NewFiles/docs.css" rel="stylesheet" />

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
    <![endif]-->

</head>

<body data-spy="scroll" data-target=".bs-docs-sidebar">

    <!--一个隐藏的input 保留CourseID--->

    <!--一个隐藏分的input 保留PaperID-->
    <input  id="praId" type="hidden" value="@ViewBag.pra.IPracticeId"/>


    <header class=" subhead" id="overview">
        <!--试卷的头部（包括试卷名，考试的科目，考核方式）-->
        <div id="TestPaperHeader" style="margin-left: auto; margin-right: auto; float: left">
            <!--试卷标题-->
            <div class="container center " style="text-align: center;">
                <label class="lead">@ViewBag.pra.SPracticeName</label>
                <h4>学号：<span id="stuCode">@ViewBag.stu.SNo</span> | 姓名：<span id="stuName">@ViewBag.stu.SName</span> | 班级：@ViewBag.stu.SClassName</h4>
                <h4> 总分：100 , 成绩：@ViewBag.pra.IScore</h4>
            </div>

            <!-- end 试卷标题-->




            <!--end 考试科目及考核方式-->

        </div>



    </header>
    <!-- end试卷的头部-->

    <div class="container">

        <div class="row">
            <div class="span9">


                @{ 
                    var i = 0;
                    string[] str = { "一、", "二、", "三、", "四、", "五、", "六、", "七、", "八、", "九、", "十、" };   //大题编号
                    string[] type = { "", "单选题", "多选题", "判断题" };          
                }
                @foreach (var a in ViewBag.TestPaperDetail)
                {
                    i++;
                    var pid = "s" + i;
                    var qNo = 0;     //大题里面小题题号
                    var totalCount = a.StrategyItem.IScore;//大题的总分 
                    var totalNum = a.StrategyItem.INum;//小题数量
                    var perScore = totalCount / totalNum;//每小题的平均分
                    <!--获取试题的大题信息-->
                    <div id="@pid" style="margin-top:5px;">

                        <p class="font-md">
                            <span style="font-size: 20px; font-weight: bold;">@str[i - 1] @type[a.StrategyItem.Id]
                                (学生得分：@a.stuGetScore)</span>
                        </p>



                        @foreach (var b in a.LibItemList)//标题
                        {
                            qNo++;
                            string tempstr = qNo + ". ";
                            <!--小题题块-->
                            <div id="@b.LibItem.Id" style="margin-top:15px;">

                                <!--获取小题的题型  todo-->
                                <input type="hidden" id="TestLbId" value="@b.LibItem.IProblemType" />
                                <!--手动换题-->
                                <div style="float: right">
                                </div>
                                <!--end 手动换题-->
                                <!--小题内容-->
                                <div style="">
                                    <label class="font-md">
                                        @tempstr @b.LibItem.STitle
                                    </label>
                                    @{
                            string trueAnswer = "";
                            int tempI = 0;//用于标记选项
                            string[] Option = { "A.", "B.", "C.", "D.", "E.", "F.", "G.", "H." };
                            string color = b.isOk == 0 ? "red" : "green"; 
                                        <table class="smart-form" style="display: inline;">
                                            @foreach (var c in b.OptionList)
                                            {
                                                string OptionStr = "Option" + qNo;
                                       
                                                <tr>
                                                    <td style="padding-left: 10px;" class="font-md">@Option[tempI] @c.SOptionName</td>
                                                </tr>
                                                tempI++;
                                                if (c.IIsTrue == 1)
                                                {
                                                    trueAnswer = trueAnswer + "," + c.SOptionName;
                                                }
                                            }
                                            @{trueAnswer = trueAnswer.Substring(1, trueAnswer.Length - 1);}
                                        </table>
                                        <div style="width: 50%; height: 100%; float: right;">
                                            @{string StuAnswer =
                                      string.IsNullOrEmpty(b.StuAnswer) ? " " :
                                      b.StuAnswer.Substring(1, b.StuAnswer.Length - 1);}
                                            <span style="font-size:16px;color:@color">学生答案：@StuAnswer</span>
                                            <br />
                                            <br />
                                            <span style="font-size: 16px;">正确答案：@trueAnswer</span>
                                        </div>
                                        <hr />
                                    }


                                </div>
                                <!--end 小题内容-->



                            </div>
                            <!-- end 小题题块-->
                        }

                    </div> 
                    <hr />
                    <!--end 获取试题的大题信息--> 
                }


            </div>
            <div class="span3 bs-docs-sidebar">
                <ul class="nav nav-list bs-docs-sidenav">
                    <li><a href="#"><i class="icon-chevron-left"></i>题号</a></li>
                    @{ 
                        var j = 0;
                        string[] strs = { "一", "二", "三", "四", "五", "六", "七", "八", "九", "十" };   //大题编号
                           
                    }

                    @foreach (var a in ViewBag.TestPaperDetail)
                    {
                        j++;
                        string Str = "#s" + j;
               
                        <li><a href="@Str"><i class="icon-chevron-left"></i>@strs[j - 1]</a></li>;


                    }

                </ul>
            </div>

        </div>

    </div>


    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->


    <script src="~/Scripts/jquery-1.8.2.min.js"></script>
    <script src="~/Scripts/NewFiles/bootstrap.min.js"></script>
    <script src="~/Scripts/NewFiles/holder.min.js"></script>
    <script src="~/Scripts/NewFiles/application.js"></script>

    <script src="~/Scripts/NewFiles/prettify.js"></script>


</body>
</html>
